<template>
	<view class="padding bg-white">
		<view class="cu-bar bg-white">
			<view class="text-content">
				<text class="cuIcon-titles text-blue"></text>
				<text>{{detail.articleTitle}}</text>
			</view>
		</view>
		<u-parse :content="detail.articleDetail"></u-parse>
	</view>
</template>

<script>
	import { articleDetail } from '@/api/cms.js'
	export default {
		data() {
			return {
				id: 0,
				detail: {},
			}
		},
		onLoad(options) {
			this.id = options.id
		},
		onShow() {
			this.getArticleDetail();
		},
		methods: {
			getArticleDetail() {
				articleDetail({
					articleId: this.id
				}).then(res => {
					this.detail = res.data;
					uni.setNavigationBarTitle({
						title: res.data.articleTitle
					})
				})
			}
		}
	}
</script>

<style>

</style>
